#pragma once

#include <string>
#include <vector>
#include "scene.h"
#include "vec3.h"
#include "mat3.h"
#include "mat4.h"
#include "Cvars.h"

using std::vector;
using std::string;

class MeshModel : public Model
{
public:
	MeshModel(const string& file);

	void loadFromFile(const string& file);

	virtual void render(RendererPtr renderer);

	virtual void translate(float x = 0.0f, float y = 0.0f, float z = 0.0f);

	virtual void scale(float x = 1.0f, float y = 1.0f, float z= 1.0f);

	virtual void rotate(float x = 0.0f, float y = 0.0f, float z = 0.0f);

protected:
	vector<Vec3> _vertices;
	vector<Vec3> _normals;	

	ModelPtr _boundingBox;

	CvarPtr _modelAxis;

	CvarPtr _faceNormalDraw;
	CvarPtr _faceNormalColor;
	CvarPtr _faceNormalSize;

	CvarPtr _vertexNormalDraw;
	CvarPtr _vertexNormalColor;
	CvarPtr _vertexNormalSize;	
};
